#
# @lc app=leetcode.cn id=26 lang=python3
#
# [26] 删除有序数组中的重复项
#

# @lc code=start
class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        if not nums:
            return 0
        temp=[]
        for i in nums:
            if i not in temp:
                temp.append(i)
        for i in range(len(temp)):
            nums[i]=temp[i]
        return len(temp)
        
# @lc code=end

